<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Card Element</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Card Element' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../intern.html">Inter Modules</a></li><li><a href="index.html">index</a></li><li><a href="index.html#3">Chapter 3: Elements</a></li><li><b>Card Element</b></li></ul></div>
<p class="purpose">To write the Library Card element (Cd) in the index.</p>

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. </b>The Library Card is part of the Contents index, and is intended as a
natural way to present bibliographic data to the user. In effect, it's a
simplified form of the iFiction record, without the XML overhead.
</p>

<p class="commentary">Note that the full version number is only listed on the Card if it is more
than just a major version number (i.e., a non-negative integer): if it is
something like "6", then it must be exactly the same as the release number,
and there is no need to list both.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">CardElement::render</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">CardElement::render</span></span>:<br/>The Periodic Table - <a href="3-tpt.html#SP4">&#167;4</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">OUTPUT_STREAM</span><span class="plain-syntax">, </span><span class="reserved-syntax">index_session</span><span class="plain-syntax"> *</span><span class="identifier-syntax">session</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_tree</span><span class="plain-syntax"> *</span><span class="identifier-syntax">I</span><span class="plain-syntax"> = </span><a href="1-ia.html#SP10" class="function-link"><span class="function-syntax">Indexing::get_tree</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">session</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">pack</span><span class="plain-syntax"> = </span><span class="identifier-syntax">InterPackage::from_URL</span><span class="plain-syntax">(</span><span class="identifier-syntax">I</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"/main/completion/bibliographic"</span><span class="plain-syntax">);</span>

<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_OPEN</span><span class="plain-syntax">(</span><span class="string-syntax">"p"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="2-iu.html#SP5" class="function-link"><span class="function-syntax">IndexUtilities::anchor</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"LCARD"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML::begin_html_table_bg</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">, </span><span class="constant-syntax">3</span><span class="plain-syntax">, </span><span class="constant-syntax">3</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"bg_images/indexcard.png"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-ce.html#SP2" class="function-link"><span class="function-syntax">CardElement::Library_Card_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="string-syntax">"Story title"</span><span class="plain-syntax">, </span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^title"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Untitled"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-ce.html#SP2" class="function-link"><span class="function-syntax">CardElement::Library_Card_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="string-syntax">"Story author"</span><span class="plain-syntax">, </span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^author"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Anonymous"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-ce.html#SP2" class="function-link"><span class="function-syntax">CardElement::Library_Card_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="string-syntax">"Story headline"</span><span class="plain-syntax">, </span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^headline"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"An Interactive Fiction"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-ce.html#SP2" class="function-link"><span class="function-syntax">CardElement::Library_Card_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="string-syntax">"Story genre"</span><span class="plain-syntax">, </span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^genre"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Fiction"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax"> = (</span><span class="reserved-syntax">int</span><span class="plain-syntax">) </span><span class="identifier-syntax">Metadata::read_optional_numeric</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^episode"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">series_name</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::optional_textual</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^series"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">series_name</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">episode_text</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">episode_text</span><span class="plain-syntax">, </span><span class="string-syntax">"%d of %S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">E</span><span class="plain-syntax">, </span><span class="identifier-syntax">series_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="3-ce.html#SP2" class="function-link"><span class="function-syntax">CardElement::Library_Card_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="string-syntax">"Episode"</span><span class="plain-syntax">, </span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">, </span><span class="identifier-syntax">episode_text</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">episode_text</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><a href="3-ce.html#SP2" class="function-link"><span class="function-syntax">CardElement::Library_Card_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="string-syntax">"Release number"</span><span class="plain-syntax">, </span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^release"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"1"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">version_number</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::optional_textual</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^version"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">version_number</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">TEMPORARY_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">version_text</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">version_text</span><span class="plain-syntax">, </span><span class="string-syntax">"%S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">version_number</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">Str::includes_character</span><span class="plain-syntax">(</span><span class="identifier-syntax">version_text</span><span class="plain-syntax">, </span><span class="character-syntax">'.'</span><span class="plain-syntax">)) ||</span>
<span class="plain-syntax">            (</span><span class="identifier-syntax">Str::includes_character</span><span class="plain-syntax">(</span><span class="identifier-syntax">version_text</span><span class="plain-syntax">, </span><span class="character-syntax">'+'</span><span class="plain-syntax">)) ||</span>
<span class="plain-syntax">            (</span><span class="identifier-syntax">Str::includes_character</span><span class="plain-syntax">(</span><span class="identifier-syntax">version_text</span><span class="plain-syntax">, </span><span class="character-syntax">'-'</span><span class="plain-syntax">)))</span>
<span class="plain-syntax">            </span><a href="3-ce.html#SP2" class="function-link"><span class="function-syntax">CardElement::Library_Card_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="string-syntax">"Full version number"</span><span class="plain-syntax">, </span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">, </span><span class="identifier-syntax">version_text</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">DISCARD_TEXT</span><span class="plain-syntax">(</span><span class="identifier-syntax">version_text</span><span class="plain-syntax">)</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><a href="3-ce.html#SP2" class="function-link"><span class="function-syntax">CardElement::Library_Card_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="string-syntax">"Story creation year"</span><span class="plain-syntax">, </span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^year"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"(This year)"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-ce.html#SP2" class="function-link"><span class="function-syntax">CardElement::Library_Card_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="string-syntax">"Language of play"</span><span class="plain-syntax">, </span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^language"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"English"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-ce.html#SP2" class="function-link"><span class="function-syntax">CardElement::Library_Card_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="string-syntax">"IFID number"</span><span class="plain-syntax">, </span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^IFID"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-ce.html#SP2" class="function-link"><span class="function-syntax">CardElement::Library_Card_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="string-syntax">"Story description"</span><span class="plain-syntax">, </span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^description"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"None"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Metadata::optional_textual</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^licence"</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><a href="3-ce.html#SP2" class="function-link"><span class="function-syntax">CardElement::Library_Card_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="string-syntax">"Licence"</span><span class="plain-syntax">, </span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^licence"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Unspecified"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Metadata::optional_textual</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^copyright"</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><a href="3-ce.html#SP2" class="function-link"><span class="function-syntax">CardElement::Library_Card_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="string-syntax">"Copyright"</span><span class="plain-syntax">, </span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^copyright"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Unspecified"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Metadata::optional_textual</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^origin"</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><a href="3-ce.html#SP2" class="function-link"><span class="function-syntax">CardElement::Library_Card_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="string-syntax">"Origin URL"</span><span class="plain-syntax">, </span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^origin"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Unspecified"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Metadata::optional_textual</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^rights"</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><a href="3-ce.html#SP2" class="function-link"><span class="function-syntax">CardElement::Library_Card_entry</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="string-syntax">"Rights history"</span><span class="plain-syntax">, </span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^rights"</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"Unspecified"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML::end_html_table</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"p"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b>This uses:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">CardElement::Library_Card_entry</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">CardElement::Library_Card_entry</span></span>:<br/><a href="3-ce.html#SP1">&#167;1</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">OUTPUT_STREAM</span><span class="plain-syntax">, </span><span class="reserved-syntax">char</span><span class="plain-syntax"> *</span><span class="identifier-syntax">field</span><span class="plain-syntax">, </span><span class="identifier-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">pack</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">key</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">t</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML::first_html_column_nowrap</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">key</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^title"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML::begin_span</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"librarycardtitle"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML::begin_span</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"librarycardother"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML::begin_span</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"typewritten"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%s"</span><span class="plain-syntax">, </span><span class="identifier-syntax">field</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML::end_span</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML::end_span</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML::next_html_column</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">key</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^title"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML::begin_span</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"librarycardtitle"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">HTML::begin_span</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"librarycardother"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML::begin_span</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"typewritten"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_OPEN</span><span class="plain-syntax">(</span><span class="string-syntax">"b"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><a href="3-ce.html#SP3" class="function-link"><span class="function-syntax">CardElement::index_variable</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">, </span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">key</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML_CLOSE</span><span class="plain-syntax">(</span><span class="string-syntax">"b"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML::end_span</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML::end_span</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HTML::end_html_row</span><span class="plain-syntax">(</span><span class="identifier-syntax">OUT</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b>And both of those features use:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">CardElement::index_variable</span><button class="popup" onclick="togglePopup('usagePopup3')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup3">Usage of <span class="code-font"><span class="function-syntax">CardElement::index_variable</span></span>:<br/><a href="3-ce.html#SP2">&#167;2</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">OUTPUT_STREAM</span><span class="plain-syntax">, </span><span class="identifier-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">pack</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">key</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">t</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">key</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">key</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"^release"</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">R</span><span class="plain-syntax"> = (</span><span class="reserved-syntax">int</span><span class="plain-syntax">) </span><span class="identifier-syntax">Metadata::read_optional_numeric</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">key</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">R</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) { </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%d"</span><span class="plain-syntax">, </span><span class="identifier-syntax">R</span><span class="plain-syntax">); </span><span class="reserved-syntax">return</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">matter</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Metadata::optional_textual</span><span class="plain-syntax">(</span><span class="identifier-syntax">pack</span><span class="plain-syntax">, </span><span class="identifier-syntax">key</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">matter</span><span class="plain-syntax">) { </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">matter</span><span class="plain-syntax">); </span><span class="reserved-syntax">return</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"%S"</span><span class="plain-syntax">, </span><span class="identifier-syntax">t</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="3-be.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresschapter"><a href="1-im.html">1</a></li><li class="progresschapter"><a href="2-il.html">2</a></li><li class="progresscurrentchapter">3</li><li class="progresssection"><a href="3-tpt.html">tpt</a></li><li class="progresssection"><a href="3-ae.html">ae</a></li><li class="progresssection"><a href="3-ae2.html">ae2</a></li><li class="progresssection"><a href="3-be.html">be</a></li><li class="progresscurrent">ce</li><li class="progresssection"><a href="3-ce2.html">ce2</a></li><li class="progresssection"><a href="3-ce3.html">ce3</a></li><li class="progresssection"><a href="3-ce4.html">ce4</a></li><li class="progresssection"><a href="3-ee.html">ee</a></li><li class="progresssection"><a href="3-ee2.html">ee2</a></li><li class="progresssection"><a href="3-fe.html">fe</a></li><li class="progresssection"><a href="3-ge.html">ge</a></li><li class="progresssection"><a href="3-ge2.html">ge2</a></li><li class="progresssection"><a href="3-ie.html">ie</a></li><li class="progresssection"><a href="3-le.html">le</a></li><li class="progresssection"><a href="3-me.html">me</a></li><li class="progresssection"><a href="3-pe.html">pe</a></li><li class="progresssection"><a href="3-pe2.html">pe2</a></li><li class="progresssection"><a href="3-re.html">re</a></li><li class="progresssection"><a href="3-rfse.html">rfse</a></li><li class="progresssection"><a href="3-se.html">se</a></li><li class="progresssection"><a href="3-te.html">te</a></li><li class="progresssection"><a href="3-te2.html">te2</a></li><li class="progresssection"><a href="3-ve.html">ve</a></li><li class="progresssection"><a href="3-ve2.html">ve2</a></li><li class="progresschapter"><a href="4-mc.html">4</a></li><li class="progressnext"><a href="3-ce2.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

